<template>
	<!-- 收缩菜单 -->
	<el-icon :size="25" @click="isCollapse = !isCollapse">
		<component :is="isCollapse ? Fold : Expand"></component>
	</el-icon>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { Fold, Expand } from '@element-plus/icons-vue'
const props = defineProps<{ collapse: boolean }>()
const emits = defineEmits(['update:collapse'])
const isCollapse = computed({
	get() {
		return props.collapse
	},
	set(newvalue) {
		emits('update:collapse', newvalue)
	}
})
</script>

<style scoped></style>
